package com.teemor.blog.service.impl;

import com.teemor.blog.bean.condition.TbSubscribeCondition;
import com.teemor.blog.bean.entity.TbSubscribe;
import com.teemor.blog.mapper.TbSubscribeMapper;
import com.teemor.blog.service.ISubscribeService;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author: zhoulk
 * @Description: 原子服务实现
 * @date: 2020/03/24 17:33:32
 */
@Service
public class SubscribeServiceImpl implements ISubscribeService {
    @Autowired
    private TbSubscribeMapper tbSubscribeMapper;

    @Override
    public int countSubscribe(TbSubscribeCondition condition) {
        return tbSubscribeMapper.countSubscribeByCondition(condition);
    }

    @Override
    public List<TbSubscribe> qrySubscribes(TbSubscribeCondition condition) {

        return tbSubscribeMapper.selectSubscribeByCondition(condition);
    }

    @Override
    public TbSubscribe qrySubscribeById(Integer id) {
        return tbSubscribeMapper.selectSubscribeById(id);
    }

    @Override
    public int addSubscribe(TbSubscribe inParam) {
        return tbSubscribeMapper.insertSubscribe(inParam);
    }

    @Override
    public int updSubscribeById(TbSubscribe inParam) {
        return tbSubscribeMapper.updateSubscribeById(inParam);
    }
}